// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdCountryTrl
 */
public class AdCountryTrlDaoImpl
    extends org.tinaelle.server.domain.AdCountryTrlDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdCountryTrlDao#toAdCountryTrlDTO(org.tinaelle.server.domain.AdCountryTrl)
     */
    public org.tinaelle.common.dto.AdCountryTrlDTO toAdCountryTrlDTO(final org.tinaelle.server.domain.AdCountryTrl entity)
    {
        return super.toAdCountryTrlDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdCountryTrl loadAdCountryTrlFromAdCountryTrlDTO(org.tinaelle.common.dto.AdCountryTrlDTO adCountryTrlDTO)
    {
        org.tinaelle.server.domain.AdCountryTrl adCountryTrl = this.load(adCountryTrlDTO.getAdCountryTrlId());
        if (adCountryTrl == null)
        {
            adCountryTrl = org.tinaelle.server.domain.AdCountryTrl.Factory.newInstance();
        }
        return adCountryTrl;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdCountryTrlDao#adCountryTrlDTOToEntity(org.tinaelle.common.dto.AdCountryTrlDTO)
     */
    public org.tinaelle.server.domain.AdCountryTrl adCountryTrlDTOToEntity(org.tinaelle.common.dto.AdCountryTrlDTO adCountryTrlDTO)
    {
        org.tinaelle.server.domain.AdCountryTrl entity = this.loadAdCountryTrlFromAdCountryTrlDTO(adCountryTrlDTO);
        this.adCountryTrlDTOToEntity(adCountryTrlDTO, entity, true);
        return entity;
    }
}